<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%pageContext.setAttribute("ctx", request.getContextPath()); %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>博客后台管理</title>
		<meta http-equiv="content-type" content="text/html;charset=UTF-8">
		<link href="${ctx}/admin/images/style.css" type="text/css"
			rel="stylesheet">
	</head>
	<script type="text/javascript">		
			function del() {
				var msg = "您真的确定要删除吗？\n\n请确认！";
				if (confirm(msg)==true){
						return true;
					}else{
						return false;
					}
				}
	</script>	
	<body>
		<div id="container">
			<div id="main">
			<h3>友情链接列表</h3>
<table id="tab">
<tr>
   <th>编号</th>
   <th>名称</th>
   <th>URL</th>
   <th>显示顺序</th>
   <th>操作</th>
</tr>
<c:forEach items="${links}" var="l">
	<tr>
		   <td>${l.id}</td>
		   <td>${l.name}</td>
		   <td>${l.url}</td>
		   <td>${l.displayOrder}</td>
		   <td align="center">
		   <a href="${ctx}/admin/editLink?id=${l.id}"><img src="${ctx}/admin/images/edit.gif" border="0" alt="编辑"></a>  
		   <a href="${ctx}/admin/deleteLink?id=${l.id}" onclick="javascript:return del()"><img src="${ctx}/admin/images/delete.gif" border="0" alt="删除"></a>
		   </td>    
	</tr>
	</c:forEach>
</table>

    </div>
</div>
<%@include file="/admin/footer.jsp"%>